package org.gardenXml.diList;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestEmp {
    public static void main(String[] args) {
        ApplicationContext context =new ClassPathXmlApplicationContext("beanList.xml");
//        Emp emp = context.getBean("emp", Emp.class);
//        emp.work();
        Dept  dept = context.getBean("dept", Dept.class);
        dept.getEms().get(0).getDept().getEms().get(0).work();
//        for (Emp emp:dept.getEms()){
////            System.out.println(emp.geteName());
//
//            System.out.println(emp.getDept());
//        }
//        dept.info();
        System.out.println(dept.getEms().size());
    }
}
